package cn.itcast.cart.service;


import cn.itcast.cart.dto.ShoppingCartDTO;
import cn.itcast.cart.pojo.ShoppingCart;

import java.util.List;

public interface ShoppingCartService {

    /**
     * 添加购物车
     * @param shoppingCartDTO
     */
    void add(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查询购物车
     * @return
     */
    List<ShoppingCart> list();

    /**
     * 清空购物车
     */
    void clean();

    /**
     * 删除购物车中单个的商品
     * @param shoppingCartDTO
     */
    void deleteOne(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查询购物车
     * @param shoppingCart
     * @return
     */
    List<ShoppingCart> getList(ShoppingCart shoppingCart);

    /**
     * 清空购物车
     * @param shoppingCart
     */
    void delete(ShoppingCart shoppingCart);
}
